#include <bits/stdc++.h>
using namespace std;
const int N = 2e5+5;

int n, a[N];

int main(int argc, char const *argv[])
{
    int t;
    scanf("%d", &t);
    for (int kk=0; kk<t; ++kk) {
        scanf("%d", &n);
        int m = 0;
        for (int i=0; i<n; ++i) {
            int x; scanf("%d", &x);
            if (x % 2 == 0) a[m++] = x;
        }
        sort(a, a+m);

        map<int, int> mp;
        for (int i=0, j; i<m; i=j+1) {
            j = i;
            while (j+1<m && a[j+1] == a[i]) ++j;
            mp[a[i]] = j-i+1;
        }
        int ans = 0;
        while (mp.size()) {
            auto p = --mp.end();
            ++ans;
            int newv = p->first / 2;
            if (newv % 2 == 0) mp[newv] += p->second;
            mp.erase(p);
            // printf("%d\n", ans);
        }
        printf("%d\n", ans);
    }
    return 0;
}
